//
//  XMCameraAngleCell.m
//  XiaoMiao
//
//  Created by 23 on 2018/2/6.
//  Copyright © 2018年 smallyou. All rights reserved.
//

#import "XMCameraAngleCell.h"
#import "XMCameraAngleModel.h"

@interface XMCameraAngleCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@end

@implementation XMCameraAngleCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    self.contentView.layer.cornerRadius = 5;
    self.contentView.layer.masksToBounds = YES;
}


- (void)setAngle:(XMCameraAngleModel *)angle
{
    _angle = angle;
    
    NSString *imgUrl = [NSString stringWithFormat:@"%@", angle.imageUrl];
    if (angle.isPhotoed) {
        [self.iconView sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:angle.resultImage];
    }else{
        [self.iconView sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:angle.resultImage];
    }
    self.nameLabel.text = angle.name;
}

@end
